package com.lantosec.hmrp.modules.morality.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.util.Date;

import com.lantosec.hmrp.core.mvc.BaseEntity;
import com.lantosec.hmrp.modules.morality.vo.MoralityNoteVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 考评记录 实体类
 * </p>
 *
 * @author AutoCode
 * @since 2020-04-20
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class MoralityNote extends BaseEntity<MoralityNoteVO> {

    private static final long serialVersionUID = 1L;
    public MoralityNote(MoralityNoteVO vo){
        this.moralityNoteId = vo.getMoralityNoteId();
        this.moralityPlanId = vo.getMoralityPlanId();
        this.moralityTargetId = vo.getMoralityTargetId();
        this.targetDeptId = vo.getTargetDeptId();
        this.targetBranchId = vo.getTargetBranchId();
        this.selfScore = vo.getSelfScore();
        this.selfLevel = vo.getSelfLevel();
        this.rewardScore = vo.getRewardScore();
        this.selfCommitTime = vo.getSelfCommitTime();
        this.learningSituation = vo.getLearningSituation();
        this.selfComment = vo.getSelfComment();
        this.deptScore = vo.getDeptScore();
        this.deptLevel = vo.getDeptLevel();
        this.deptCommitTime = vo.getDeptCommitTime();
        this.deptComment = vo.getDeptComment();
        this.branchScore = vo.getBranchScore();
        this.branchLevel = vo.getBranchLevel();
        this.branchCommitTime = vo.getBranchCommitTime();
        this.branchComment = vo.getBranchComment();
        this.committeeScore = vo.getCommitteeScore();
        this.committeeLevel = vo.getCommitteeLevel();
        this.committeeCommitTime = vo.getCommitteeCommitTime();
        this.committeeComment = vo.getCommitteeComment();
        this.createTime = vo.getCreateTime();
    }

    @Override
    public MoralityNoteVO convertToVO(){
        return new MoralityNoteVO(this);
    }


    /**
     * 考评记录ID
     */
    @TableId(value = "morality_note_id", type = IdType.AUTO)
    private Integer moralityNoteId;

    /**
     * 考评方案ID
     */
    private Integer moralityPlanId;

    /**
     * 被考评人ID
     */
    private String moralityTargetId;

    /**
     * 被考评人所属部门ID
     */
    private String targetDeptId;

    /**
     * 被考评人所属党支部ID
     */
    private String targetBranchId;

    /**
     * 自评得分
     */
    private BigDecimal selfScore;

    /**
     * 自评等级
     */
    private Integer selfLevel;

    /**
     * 日常加减分
     */
    private BigDecimal rewardScore;

    /**
     * 自评提交时间
     */
    private Date selfCommitTime;

    /**
     * 学习情况（被考评人填写）
     */
    private String learningSituation;

    /**
     * 自评总结
     */
    private String selfComment;

    /**
     * 科室评分
     */
    private BigDecimal deptScore;

    /**
     * 科室评等级
     */
    private Integer deptLevel;

    /**
     * 科室审核时间
     */
    private Date deptCommitTime;

    /**
     * 科室评语
     */
    private String deptComment;

    /**
     * 党支部评分
     */
    private BigDecimal branchScore;

    /**
     * 党支部评等级
     */
    private Integer branchLevel;

    /**
     * 党支部审核时间
     */
    private Date branchCommitTime;

    /**
     * 党支部评语
     */
    private String branchComment;

    /**
     * 考评委员会评分
     */
    private BigDecimal committeeScore;

    /**
     * 考评委员会评等级
     */
    private Integer committeeLevel;

    /**
     * 考评委员会审核时间
     */
    private Date committeeCommitTime;

    /**
     * 考评委员会评语
     */
    private String committeeComment;

    /**
     * 创建时间
     */
    private Date createTime;

    public enum ColName {
        morality_note_id, morality_plan_id, morality_target_id, target_dept_id, target_branch_id, self_score, self_level, reward_score, self_commit_time, learning_situation, self_comment, dept_score, dept_level, dept_commit_time, dept_comment, branch_score, branch_level, branch_commit_time, branch_comment, committee_score, committee_level, committee_commit_time, committee_comment, create_time,
    }
}
